import axios from "axios";
axios.defaults.baseURL = "http://localhost:3008";

export const loginApi = (params) => axios.post("/admins/adminLogin", params);

export const getAdminsList = (params = { pageNumber: 1, pageSize: 10 }) =>
  axios.post("/admins/getAdminsList", params);

export const deleteOneAdmin = (id) =>
  axios.delete("/admins/deleteOneAdmin?id=" + id);

export const addOneAdminApi = (params) =>
  axios.post("/admins/addOneAdmin", params);

export const getOneAdmin = (params) =>
  axios.post("/admins/getOneAdmin?id=", params);

export const updateOneAdminApi = (params) =>
  axios.post("/admins/updateOneAdmin", params);
